<template>
  <div class="desc">
    <h4>{{ goodsDesc.title }}</h4>
    <hr />
    <div class="goodsDesc-content" v-html="goodsDesc.content"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
        goodsDesc: {}
    }
  },
  created() {
      this.getGoodsDesc(this.$route.params.id)
  },
  methods: {
      async getGoodsDesc(id) {
          const {data: res} = await this.$http.get(`/api/goods/getdesc/${id}`)
          this.goodsDesc = res.message[0]
      }
  }
}
</script>

<style lang="less" scoped>
.desc{
    overflow: hidden;
}
h4 {
  font-size: 16px;
  color: #226aff;
  text-align: center;
  margin: 15px 0;
}
.goodsDesc-content {
  padding: 0 5px;
}
</style>
